import request from "@/request/api";

//班别方案接口
//1.交接班记录分页查询
export function queryShiftRecordList(data) {
  return request({
    url: "/eam-service-operation/shift/page",
    method: "get",
    params: data,
  });
}
//2.交接班记录详情
export function queryShiftRecordDetail(data) {
  return request({
    url: "/eam-service-operation/shift",
    method: "get",
    params: data,
  });
}
//3.交接班次查询
export function queryHandoverShift(data) {
  return request({
    url: "/eam-service-operation/shift/info",
    method: "get",
    params: data,
  });
}
//4、人员调整
export function adjustStaffMember(data) {
  return request({
    url: "/eam-service-operation/shift/adjustStaff",
    method: "post",
    data: data,
  });
}
//5、交接班记录详情保存或更新
export function addOrUpdateShiftRecord(data) {
  return request({
    url: "/eam-service-operation/shift/save",
    method: "post",
    data: data,
  });
}
//6.交班
export function handoverShift(data) {
  return request({
    url: "/eam-service-operation/shift/handover",
    method: "put",
    data: data,
  });
}
//7、接班
export function acceptShift(data) {
  return request({
    url: "/eam-service-operation/shift/takeover",
    method: "put",
    params: data,
  });
}
//8、接班驳回
export function rejectShift(data) {
  return request({
    url: "/eam-service-operation/shift/reject",
    method: "put",
    params: data,
  });
}

//4、查询人员调整记录
export function queryAdjustRecords(data) {
  return request({
    url: "/eam-service-operation/shift/adjustRecord",
    method: "get",
    params: data,
  });
}

//4、交接事项查询
export function queryShiftTips(data) {
  return request({
    url: "/eam-service-operation/shift/tips",
    method: "get",
    params: data,
  });
}

//直接接班
export function straightTakeover(data) {
  return request({
    url: "/eam-service-operation/shift/straightTakeover",
    method: "put",
    params: data,
  });
}

//查询指定单位的值班地点
export function getLocations(data) {
  return request({
    url: "/eam-service-operation/shift/locations",
    method: "get",
    params: data,
  });
}

//打印交接班记录
export function previewShift(data) {
  return request({
    url: "/eam-service-operation/shift/printShift",
    method: "get",
    params: data,
  });
}

//值班记录查询接口
export function queryOnDutyRecordList(data) {
  return request({
    url: "/eam-service-operation/duty/page",
    method: "get",
    params: data,
  });
}
//月度排班查询接口
export function getMonthClass(data) {
  return request({
    url: "/eam-service-operation/shift/getMonthClass",
    method: "get",
    params: data,
  });
}